if (obj.hasOwnProperty("key1")) { ... }
var obj = { key: undefined }; obj["key"] !== undefined // false, but the key exists!